<template>
  <div class="storesign-progress">
    <div class="container-title">审核进度</div>
    <div class="progress-list"  v-if="list.length">
      <div class="pro-item" v-for="(item, idx) in list" :key='idx'>
        <Tag :color="tags[item.status]">{{item.operatorName || item.candidateRoleNames}} | {{status[item.status]}}</Tag>
        <p class="time">{{item.completeTime || '--'}}</p>
      </div>
    </div>
    <div v-else>
      <p>暂无进度！</p>
    </div>
  </div>
</template>
<script>

  export default {
    props: {
      form: {
        type: Object
      },
      applyId: String
    },
    components: {
    },
    mounted () {
      this.getList()
    },
    data() {
      return {
        list: [],
        tags: { pending:'primary', passed:'success', rejected:'warning'},
        status: { pending: '待办', passed: '通过', rejected: '不通过' }
      }
    },
    methods: {
      getList() {
        if (!this.applyId) return
        this.$ajaxGet(`/contract_store/detail_changelog/workflow/${this.applyId}`).then(res => {
          this.list = res
        })
      },
    },
  }
</script>